package com.mall.shopping.dto.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author xrj
 * @since 2022-05-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TbPanelContent extends Model<TbPanelContent> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 所属板块id
     */
    @TableField("panel_id")
    private Integer panelId;

    /**
     * 类型 0关联商品 1其他链接
     */
    @TableField("type")
    private Integer type;

    /**
     * 关联商品id
     */
    @TableField("product_id")
    private Long productId;

    @TableField("sort_order")
    private Integer sortOrder;

    /**
     * 其他链接
     */
    @TableField("full_url")
    private String fullUrl;

    @TableField("pic_url")
    private String picUrl;

    /**
     * 3d轮播图备用
     */
    @TableField("pic_url2")
    private String picUrl2;

    /**
     * 3d轮播图备用
     */
    @TableField("pic_url3")
    private String picUrl3;

    @TableField("created")
    private LocalDateTime created;

    @TableField("updated")
    private LocalDateTime updated;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
